/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.autoescola.core.dao.security.user;

import com.autoescola.core.dao.Dao;
import com.autoescola.core.entity.security.User;
import javax.validation.constraints.NotNull;

/**
 *
 * @author leonardo luz fernandes
 * @version 0.1
 * @since 01/11/2010
 */

@Dao
public interface UserDao {

    public User logon( @NotNull String username , @NotNull String password ) throws Exception;
    public User logon( @NotNull User user ) throws Exception ;
    public boolean logout( @NotNull String username , @NotNull String password ) throws Exception ;
    public boolean logout( @NotNull User user ) throws Exception ;
    public User create( @NotNull User user ) throws Exception ;
    public boolean delete( @NotNull String username , @NotNull String password ) throws Exception ;   
    public boolean delete( @NotNull User user ) throws Exception ;
    public User update( @NotNull User user ) throws Exception ;
    public User changePassword( @NotNull String username , @NotNull String oldPassword , @NotNull String newPassword  ) throws Exception ;
    
}//end interface
